
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>工具集 · classbro-u-center-web-v2.0</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="Gj">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism-tomorrow.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../index.css">
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="Config.html" />
    
    
    <link rel="prev" href="../" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    概要
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2" data-path="Utils.html">
            
                <a href="Utils.html">
            
                    
                    工具集
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="Config.html">
            
                <a href="Config.html">
            
                    
                    环境变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="I18n.html">
            
                <a href="I18n.html">
            
                    
                    国际化
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="Interceptor.html">
            
                <a href="Interceptor.html">
            
                    
                    拦截器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="Vuex.html">
            
                <a href="Vuex.html">
            
                    
                    Vuex
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="Api.html">
            
                <a href="Api.html">
            
                    
                    接口文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="Icon.html">
            
                <a href="Icon.html">
            
                    
                    图标
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9" data-path="Xss.html">
            
                <a href="Xss.html">
            
                    
                    Xss
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.10" data-path="Permission.html">
            
                <a href="Permission.html">
            
                    
                    菜单&权限校验
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >工具集</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5DE5;&#x5177;&#x96C6;">&#x5DE5;&#x5177;&#x96C6;</h1>
<blockquote>
<p>&#x76EE;&#x5F55;&#x5730;&#x5740;&#xFF1A; <code>src/utils</code></p>
<p>&#x4E3A;&#x4E86;&#x65B9;&#x4FBF;&#x7EDF;&#x4E00;&#x914D;&#x7F6E;&#xFF0C;&#x907F;&#x514D;&#x91CD;&#x590D;&#x5DE5;&#x4F5C;&#xFF0C;&#x4E00;&#x4E9B;&#x5E38;&#x7528; &#x5DE5;&#x5177;&#x7C7B;&#x5C3D;&#x91CF;&#x653E;&#x5230; index.js&#x91CC;&#x9762;&#xFF0C;&#x6216;&#x8005;&#x6839;&#x636E;&#x529F;&#x80FD;&#x653E;&#x5230;&#x76EE;&#x5F55;&#x4E0B;</p>
<p>&#x5DE5;&#x5177;&#x7C7B;&#x6587;&#x4EF6;&#x547D;&#x540D;&#x65B9;&#x5F0F;&#x5C3D;&#x91CF;&#x4EE5;<code>&#x5927;&#x9A7C;&#x5CF0;</code>&#x5F62;&#x5F0F;&#x547D;&#x540D;&#x3002;&#x4F8B;&#xFF1A;<code>Auth.js</code>&#x3001; <code>Interceptor</code>&#x7B49;</p>
</blockquote>
<h4 id="auth">Auth</h4>
<blockquote>
<p>&#x7528;&#x6237;Token&#x5DE5;&#x5177;</p>
</blockquote>
<h4 id="i18n">I18n</h4>
<blockquote>
<p>&#x6D89;&#x53CA;&#x56FD;&#x9645;&#x5316;&#x65B9;&#x9762;&#x62BD;&#x8C61;&#x51FA;&#x6765;&#x7684;&#x5DE5;&#x5177;</p>
</blockquote>
<h4 id="request">Request</h4>
<blockquote>
<p>&#x7EDF;&#x4E00;&#x8BF7;&#x6C42;</p>
</blockquote>
<h4 id="validate">Validate</h4>
<blockquote>
<p>ElementUI Form &#x8868;&#x5355;&#x6821;&#x9A8C;</p>
</blockquote>
<h4 id="xss">Xss</h4>
<blockquote>
<p>&#x9632;&#x8DE8;&#x7AD9;&#x811A;&#x672C;&#x653B;&#x51FB;</p>
</blockquote>
<h4 id="enum">Enum</h4>
<blockquote>
<p>&#x679A;&#x4E3E;</p>
<p>&#x5C3D;&#x91CF;&#x907F;&#x514D;&#x786C;&#x7F16;&#x7801;&#xFF0C;&#x7C7B;&#x4F3C;&#x5982;&#x4E0B;&#x7247;&#x6BB5;</p>
</blockquote>
<pre class="language-"><code class="lang-javascript"><span class="token comment">/**
 * localStorage
 * @enum
 */</span>
<span class="token keyword">export</span> <span class="token keyword">const</span> Storage <span class="token operator">=</span> <span class="token punctuation">{</span>
  <span class="token constant">TOKEN</span><span class="token operator">:</span> <span class="token string">&quot;EL-ADMIN-TOEKN&quot;</span> <span class="token comment">/* &#x7528;&#x6237;token */</span><span class="token punctuation">,</span>
  <span class="token constant">IS_ADMIN</span><span class="token operator">:</span> <span class="token string">&quot;ynAdmin&quot;</span> <span class="token comment">/* &#x7528;&#x6237;&#x7BA1;&#x7406;&#x5458;&#x6743;&#x9650; */</span><span class="token punctuation">,</span>
<span class="token punctuation">}</span><span class="token punctuation">;</span>

<span class="token operator">...</span>

<span class="token keyword">import</span> <span class="token punctuation">{</span> Storage <span class="token punctuation">}</span> <span class="token keyword">from</span> <span class="token string">&quot;@/utils/Enum&quot;</span><span class="token punctuation">;</span>
localStorage<span class="token punctuation">.</span><span class="token function">setItem</span><span class="token punctuation">(</span>Storage<span class="token punctuation">.</span><span class="token constant">TOKEN</span><span class="token punctuation">,</span> token<span class="token punctuation">)</span><span class="token punctuation">;</span>
</code></pre>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="../" class="navigation navigation-prev " aria-label="Previous page: 概要">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="Config.html" class="navigation navigation-next " aria-label="Next page: 环境变量">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"工具集","level":"1.2","depth":1,"next":{"title":"环境变量","level":"1.3","depth":1,"path":"src/Config.md","ref":"src/Config.md","articles":[]},"previous":{"title":"概要","level":"1.1","depth":1,"path":"README.md","ref":"README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["chapter-fold","-lunr","-search","search-pro","-highlight","prism","livereload"],"styles":{"website":"index.css"},"pluginsConfig":{"prism":{"css":["prismjs/themes/prism-tomorrow.css"]},"chapter-fold":{},"search-pro":{},"livereload":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":"Gj","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"classbro-u-center-web-v2.0","language":"zh-hans","gitbook":"3.2.3","description":"u-center-web 项目迁移 重构"},"file":{"path":"src/Utils.md","mtime":"2020-07-27T06:30:54.937Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-07-27T06:50:03.177Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

